<?php ?>

<?= @get('lib.anahita.sekit.actor.view.header')
	->setActor($actor) 
	->setTitle(sprintf(@text('AN-SBLOGS-ACTOR-HEADER'), $actor->name))
	?>
	

<?php foreach($actor->posts as $post) : ?>
<div>
	<h5>
		<a href="<?= @route($post->getURL())?>">
			<?= $post->title?>
		</a>
	</h5>
	<div class="an-sblog-post-body">
		<?= @truncate($post->body) ?>
	</div>
	<div class="an-se-meta">
		<?= @name($post->author)?> <?= @date($post->creationTime)?>
	</div>	
</div>
<?php endforeach;?>

<!-- START ADD NEW POST FORM -->
<?php if ($actor->getAcl()->allowPublish('com_sblogs:posts')) : ?>
<div id="an-discus-topic-add" class="an-se-pane an-se-rounded rounded">
	<?= @get('site::com.sblogs.view.post.html')->setLayout('form')->assign('actor', $actor) ?>
</div>
<?php endif;?>

<!-- END ADD NEW POST FORM -->	